package com.fishy.hw4order.client;


import com.fishy.hw4order.client.fallback.OrderClientFallback;
import com.fishy.hw4order.entity.Product;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;

@FeignClient(value = "hw4-product",path = "/hw4/product",fallback = OrderClientFallback.class)
public interface OrderClient {

    @RequestMapping("/api/{productId}")
    Product getProductById(@PathVariable Integer productId);
}
